﻿using System.Linq;
using Configuration;
using Model;
using Repository.Common;

namespace Repository
{
    public class UserRepository : Repository<User>
    {
        public UserRepository(Database context)
            : base(context)
        {
        }

        public User GetUserByUserName(string userName)
        {
            return this.GetQuery().SingleOrDefault(e => e.UserName.ToLower() == userName.ToLower());
        }
    }
}